﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Util;
using Microsoft.Xna.Framework;

namespace Hexacell {
    public class CellTransition {
        public IntVector2 Source { get; set; }
        public IntVector2 Destination { get; set; }
        public float Completion { get; protected set; }
        public bool Accelerated { get; set; }
        public float Speed { get; set; }

        public CellTransition(bool accelerated, float speed) {
            Completion = 0.0f;
            Accelerated = accelerated;
            Speed = speed;
        }

        public float distance() {
            //return IntVector2.Distance(Source, Destination);
            return 1.0f;
        }

        public void update(GameTime gameTime) {
            float elapsedSeconds = (float)gameTime.ElapsedGameTime.TotalSeconds;
            //TODO: if(Accelerated)
            Completion += Speed / distance();
        }

        public bool isCompleted() {
            return Completion >= 1.0f;
        }
    }
}
